From b624e752bd6783279c353509b7434d42ed35150f Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Tue, 9 Jan 2007 13:24:40 +0000 Subject: [PATCH] Fix for pygrub path on Solaris. Signed-off-by: John Levon --- tools/python/xen/xend/XendDomainInfo.py | 4 ++-- tools/python/xen/xend/osdep.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 3a2fa3ef4f..099302f573 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -37,7 +37,7 @@ from xen.util import asserts from xen.util.blkif import blkdev_uname_to_file from xen.util import security -from xen.xend import balloon, sxp, uuid, image, arch +from xen.xend import balloon, sxp, uuid, image, arch, osdep from xen.xend import XendRoot, XendNode, XendConfig from xen.xend.XendConfig import scrub_password @@ -1575,7 +1575,7 @@ class XendDomainInfo: else: # Boot using bootloader if not blexec or blexec == 'pygrub': - blexec = '/usr/bin/pygrub' + blexec = osdep.pygrub_path blcfg = None for (devtype, devinfo) in self.info.all_devices_sxpr(): diff --git a/tools/python/xen/xend/osdep.py b/tools/python/xen/xend/osdep.py index 35af7c55af..1dd3c7c1dd 100644 --- a/tools/python/xen/xend/osdep.py +++ b/tools/python/xen/xend/osdep.py @@ -29,8 +29,13 @@ _xend_autorestart = { "SunOS": False, } +_pygrub_path = { + "SunOS": "/usr/lib/xen/bin/pygrub" +} + def _get(var, default=None): return var.get(os.uname()[0], default) scripts_dir = _get(_scripts_dir, "/etc/xen/scripts") xend_autorestart = _get(_xend_autorestart) +pygrub_path = _get(_pygrub_path, "/usr/bin/pygrub") -- 2.30.2